package com.ruanyun.modular.app.service;

import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.aliyuncs.exceptions.ClientException;
import com.ruanyun.base.pojo.page.LayuiPageInfo;
import com.ruanyun.modular.app.entity.TUser;
import com.ruanyun.modular.app.model.params.TUserParam;
import com.ruanyun.modular.app.model.result.TUserResult;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruanyun.sys.modular.system.entity.User;
import com.ruanyun.sys.modular.system.model.result.CountyResult;

import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author zs
 * @since 2021-04-20
 */
public interface TUserService extends IService<TUser> {

    /**
     * 新增
     *
     * @author zs
     * @Date 2021-04-20
     */
    ResponseData add(TUserParam param);

    /**
     * 删除
     *
     * @author zs
     * @Date 2021-04-20
     */
    void delete(TUserParam param);

    /**
    * 删除
    * @param id
    * @return
    */
    ResponseData updateDelFlagById(Long id);

    /**
     * 更新
     *
     * @author zs
     * @Date 2021-04-20
     */
    ResponseData update(TUserParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author zs
     * @Date 2021-04-20
     */
    TUserResult findBySpec(TUserParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author zs
     * @Date 2021-04-20
     */
    List<TUserResult> findListBySpec(TUserParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author zs
     * @Date 2021-04-20
     */
     LayuiPageInfo findPageBySpec(TUserParam param);

     /**
     * 启用
     *
     * @param id
     * @return
     */
     ResponseData enableById(Long id);

     /**
     * 禁用
     *
     * @param id
     * @return
     */
     ResponseData disableById(Long id);

    ResponseData register(String phone,String pwd,String code,String socialCode,String pid);


    ResponseData getCode(String phone,String type) throws ClientException;

    ResponseData login( String phone,String pwd);

    /**
     * 修改登录密码
     * @param userId
     * @param phone
     * @param code
     * @return
     */
    ResponseData updatePwd(String userId, String phone, String code, String newPwd);



    /**
     * 忘记密码
     * @param phone
     * @param code
     * @param newPwd
     * @return
     */
    ResponseData forgetPwd(String phone, String code, String newPwd);

    /**
     * 换绑手机号
     * @param userId
     * @param oldPhone
     * @param newPhone
     * @param code
     * @return
     */
    ResponseData bindingPhone(String userId, String oldPhone, String newPhone, String code);


    /**
     * 修改用户信息
     * @param userParam
     * @return
     */
    ResponseData updateUser(TUserParam userParam);


    /*获取提交信息*/
    ResponseData getCommit(String userId);
    /*获取其他分页信息*/
    ResponseData getCommitOther(String userId,Integer type,Integer emissionWay,Integer planType);


    ResponseData getVocsRedPlan(String userId,Integer redType,Integer measureType);


    ResponseData getOrganizedInfo(Integer monitoringId,Integer isOrganization);

    ResponseData getOrganizedPollutantsInfo(Integer monitoringId,Integer isOrganization,Integer orificeId);

    ResponseData getUnorganizedLocationInfo(Integer monitoringId,Integer isOrganization);



    ResponseData getInsidePollutantsInfo(Integer monitoringId, Integer isOrganization, Integer id);

    ResponseData getUnInsidePollutantsInfo(Integer monitoringId, Integer isOrganization, Integer windType);

    List<CountyResult> getCountyList();

}
